API Documentation
Public Member Functions | List of all members
nkTasks::ThreadSubmittedWork Class Referencefinal

Encompasses all needed information and control over a task that has been submitted. More...

Public Member Functions

 ThreadSubmittedWork (Task *task, size_t taskId, Thread *parentThread)
 
 ThreadSubmittedWork (const ThreadSubmittedWork &other)
 
 ~ThreadSubmittedWork ()
 
TaskgetTask () const
 
size_t getTaskId () const
 
ThreadgetParentThread () const
 
bool cancel ()
 
bool operator== (const ThreadSubmittedWork &other) const
 

Detailed Description

Encompasses all needed information and control over a task that has been submitted.

Constructor & Destructor Documentation

◆ ThreadSubmittedWork() [1/2]

nkTasks::ThreadSubmittedWork::ThreadSubmittedWork ( Task task,
size_t  taskId,
Thread parentThread 
)

Constructor.

Parameters
taskThe task submitted.
taskIdSubmitted task's identifier.
parentThreadThe thread to which the task has been submitted.

◆ ThreadSubmittedWork() [2/2]

nkTasks::ThreadSubmittedWork::ThreadSubmittedWork ( const ThreadSubmittedWork other)

Copy constructor.

◆ ~ThreadSubmittedWork()

nkTasks::ThreadSubmittedWork::~ThreadSubmittedWork ( )

Destructor.

Member Function Documentation

◆ getTask()

Task* nkTasks::ThreadSubmittedWork::getTask ( ) const
Returns
The task linked.

◆ getTaskId()

size_t nkTasks::ThreadSubmittedWork::getTaskId ( ) const
Returns
The task's identifier linked.

◆ getParentThread()

Thread* nkTasks::ThreadSubmittedWork::getParentThread ( ) const
Returns
The thread processing the task.

◆ cancel()

bool nkTasks::ThreadSubmittedWork::cancel ( )

Requests the task linked to be cancelled.

Returns
If the work could be cancelled (true) or not (false). See nkTasks::Thread::cancelTask for more details.

◆ operator==()

bool nkTasks::ThreadSubmittedWork::operator== ( const ThreadSubmittedWork other) const

Operator override.


The documentation for this class was generated from the following file: